package org.jeecg.modules.gift.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 商品
 * @Author: jeecg-boot
 * @Date: 2024-07-10
 * @Version: V1.0
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class GiftProductDetail extends GiftProductInfo {

    @ApiModelProperty(value = "是否收藏")
    private Integer isCollect;


    public static GiftProductDetail create(GiftProductInfo info) {
        GiftProductDetail productDetail = new GiftProductDetail();
        productDetail.setId(info.getId());
        productDetail.setProductNo(info.getProductNo());
        productDetail.setProductTitle(info.getProductTitle());
        productDetail.setOriginalPrice(info.getOriginalPrice());
        productDetail.setProductPic(info.getProductPic());
        productDetail.setProductBannerImg(info.getProductBannerImg());
        productDetail.setProductDetails(info.getProductDetails());
        return productDetail;
    }
}
